package com.huiyuanai.service.serviceImpl;

import com.huiyuanai.mapper.EmployeeMapper;
import com.huiyuanai.pojo.Employee;
import com.huiyuanai.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: liwan
 * @Description:
 * @Date: create in 2022/1/12/012
 */
@Service
public class EmployeeServiceImpl implements EmployeeService {

    @Autowired
    private EmployeeMapper employeeMapper;

    @Override
    public List<Employee> queryAllEmployee() {
            return  employeeMapper.queryAllEmployee();
    }

    @Override
    public int add(Employee employee) {
        return employeeMapper.add(employee);
    }

    @Override
    public Employee getEmployeeById(Integer id) {
        Employee employee = employeeMapper.getEmployeeById(id);
        return employee;
    }

    @Override
    public int delById(Integer id) {
        return employeeMapper.delById(id);
    }

    @Override
    public int upById(Employee employee) {
        return employeeMapper.upById(employee);
    }


}
